import pytest
from unittest.mock import Mock
from src.crawler import BaseCrawler

@pytest.fixture
def mock_crawler():
    """创建模拟的爬虫实例"""
    crawler = BaseCrawler()
    crawler._make_request = Mock()
    return crawler

@pytest.fixture
def mock_response():
    """创建模拟的HTTP响应"""
    response = Mock()
    response.status_code = 200
    response.text = '<html><body>Test Content</body></html>'
    return response
